using System.Windows.Forms;
using ComponentFactory.Krypton.Toolkit;

namespace Zebra.WinFramework
{
    public static class MsgBoxHelper
    {
        //public static DialogResult Show(object Sender, string text, string caption, MessageBoxButtons buttons, MessageBoxIcon icon)
        //{
        //    return Show(text, string.Empty, buttons, icon);
        //}

        //public static DialogResult Show(object Sender, string text, string caption, MessageBoxButtons buttons)
        //{
        //    return Show(text, string.Empty, buttons, MessageBoxIcon.None);
        //}

        //public static DialogResult Show(string text)
        //{
        //    return Show(text, string.Empty, MessageBoxButtons.OK, MessageBoxIcon.None);
        //}

        //public static DialogResult Show(string text, string caption)
        //{
        //    return Show(text, caption, MessageBoxButtons.OK, MessageBoxIcon.None);
        //}

        //public static DialogResult Show(string text, string caption, MessageBoxButtons buttons, MessageBoxIcon icon)
        //{
        //    return Show(text, caption, buttons,icon, PaletteModeManager.Office2007Blue);
        //}

      
        





        
        //public static DialogResult Show(string text, string caption, MessageBoxButtons buttons, MessageBoxIcon icon, PaletteModeManager paletteMode, IPalette palette)
        //{
        //    MessageBoxEx msg = MessageBoxExManager.CreateMessageBox(null, paletteMode, palette);
        //    msg.Text = text;
        //    msg.Caption = caption;
        //    msg.Icon = (MessageBoxExIcon)icon;
        //    msg.AddButtons(buttons);
        //    string ret = msg.Show();
        //    switch (ret)
        //    {
        //        case "Ok": return DialogResult.OK;
        //        case "Yes": return DialogResult.Yes;
        //        case "No": return DialogResult.No;
        //        case "Cancel": return DialogResult.Cancel;
        //        case "Abort": return DialogResult.Abort;
        //        default: return DialogResult.Abort;
        //    }
        //}



        public static DialogResult Show(string text, string caption, MessageBoxButtons buttons, MessageBoxIcon icon)
        {
            //MessageBoxEx msg = MessageBoxExManager.CreateMessageBox(null, paletteMode, null);
            MessageBoxEx msg = MessageBoxExManager.CreateMessageBox(null);
            msg.Text = text;
            msg.Caption = caption;
            msg.Icon = (MessageBoxExIcon)icon;
            msg.AddButtons(buttons);
            string ret = msg.Show();
            switch (ret)
            {
                case "Ok": return DialogResult.OK;
                case "Yes": return DialogResult.Yes;
                case "No": return DialogResult.No;
                case "Cancel": return DialogResult.Cancel;
                case "Abort": return DialogResult.Abort;
                default: return DialogResult.Abort;
            }
        }

    }
}
